* internal. This means we ignore that 'fd' number that gets passed in.
*/
+static HANDLE comport;
+
+/*
+ * Display an error from the serial subsystem.
+ */
void GPS_Serial_Error(char *hdr)
{
char msg[200];
GPS_Error(msg);
}
-static HANDLE comport;
-
int32 GPS_Serial_On(const char *port, int32 *fd)
{
DCB tio;
if (gps_is_usb) return 1;
- if((fd = open(port, O_RDWR|O_NDELAY))==-1)
+ if((fd = open(port, O_RDWR))==-1)
{
perror("open");
gps_errno = SERIAL_ERROR;
return 0;
}
-
if(!GPS_Serial_Close(fd,port))
{
gps_errno = SERIAL_ERROR;
if (gps_is_usb) return 1;
- if((fd = open(port, O_RDWR|O_NDELAY))==-1)
+ if((fd = open(port, O_RDWR))==-1)
{
perror("open");
gps_errno = HARDWARE_ERROR;
return 0;
}
-
if(tcgetattr(*fd,&tty)==-1)
{
perror("tcgetattr");